package cn.chinaunicom.gz.controller;

import cn.chinaunicom.gz.service.HelloServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author xuwenyuan
 * @date 2020/2/15 0:35
 * @description
 */

@Controller
public class HelloController {

    Logger logger = LoggerFactory.getLogger(HelloController.class);

    @Autowired
    private HelloServiceImpl helloService;

    @RequestMapping("/hello")
    @ResponseBody
    public String hello(){
        String sayHello = "hello world";
        logger.info("logs ==> say {}",sayHello);
        helloService.doSomething();
        return "hello world...";
    }





}
